<?php
// namespace resgister;
include 'database.php';

$servername = "localhost";
$username = "root";
$password = "";
$dbName = 'taodb';
$fatherdata = [];
$childrendata = [];


$project = new databaseClass\database($servername, $username, $password,$dbName);

$name = 'koqqga112f0';
$childrenId = $name.time();
$varname = ['childrenId','name'];
$fatherdata = compact($varname);

$childrendata['childrenname'] = 'ko7486578789sazssd0';
$childrendata['fatherid'] =$childrenId;


$project->begincommit();

$tablename = 'project_fatherclass';
$project->changetb($tablename);
$project->insertdata($fatherdata);

$tablename = 'project_childrenclass';
$project->changetb($tablename);
$project->insertdata($childrendata);

$project->commit();
var_dump($project->result);